<?php
namespace Cframe;
if (PHP_VERSION < "5.3.3"){
    die ("PHP版本过低");
}
// 系统配置
define("YF_START_TIME",microtime(true));
define("YF_STATR_MEM",memory_get_usage());
define("DS",DIRECTORY_SEPARATOR);
defined('APP_PATH') || define('APP_PATH', dirname($_SERVER['SCRIPT_FILENAME']) . DS);
defined("APP_DEBUG") || define('APP_DEBUG',false);
defined("YF_PATH") || define("YF_PATH",realpath(dirname(__FILE__).DS ) . DS);
defined("LIB_PATH") || define("LIB_PATH",YF_PATH . 'Lib' . DS);
defined("COMMON_PATH") || define("COMMON_PATH",YF_PATH . 'Common' . DS);
defined("CONFIG_PATH") || define("CONFIG_PATH",COMMON_PATH . 'Config' . DS);
defined("PLUGIN_PATH") || define("PLUGIN_PATH",COMMON_PATH . 'Plugin' . DS);
defined("RUNTIME_PATH") || define("RUNTIME_PATH",APP_PATH . 'Runtime' . DS);
defined("ROUTE_PATH") || define("ROUTE_PATH",COMMON_PATH . 'Route' . DS);
$root = str_replace($_SERVER['DOCUMENT_ROOT'] ,'',APP_PATH);
$root = str_replace(DS,'/',$root);
defined("ROOT_URL") || define("ROOT_URL", $root);
defined("ROUTE_USE") || define("ROUTE_USE",true);
define("ADDONE_PATH",APP_PATH . 'Addone' . DS);
defined("IS_POST") || define("IS_POST",$_SERVER["REQUEST_METHOD"] == "POST");
defined("IS_GET") || define("IS_GET",$_SERVER["REQUEST_METHOD"] == "GET");
define('IS_CLI', PHP_SAPI == 'cli' ? true : false);
define('IS_WIN', strpos(PHP_OS, 'WIN') !== false);
defined("CON_NAME") || define("CON_NAME",'App'); // 网站更目录 控制器主文件夹,主命名空间名称
defined("CON_PATH") || define("CON_PATH",APP_PATH.CON_NAME.DS); //
defined("APP_NAME") || define("APP_NAME","Controller");
defined("BIND_MODULE") || define("BIND_MODULE","Index");
defined("BIND_CONTROLLER") || define("BIND_CONTROLLER","Index");
defined("BIND_ACTION") || define("BIND_ACTION","index");
defined("BIND_VIEW") || define("BIND_VIEW","View");
defined("BIND_MODEL") || define("BIND_MODEL","Model");
// 系统加载
require LIB_PATH . 'Lodder.php';
Lodder::register();
YException::register();
Yf::register();